<ul>
<?php
foreach($db->pages->page as $page) {
  $pagetitle = $page['title'];
  foreach(split(" ",$page['categories']) as $category) {
    if($category == $_GET['category']) {
      echo "<li>";
      echo "<a href='?show=$pagetitle'>$pagetitle</a>";
      echo "</li>";
    }
  }
}
?>
</ul>